from sqlalchemy import Column, ForeignKey
from sqlalchemy.types import Integer
from sqlalchemy.orm import relationship
from __init__ import Base

class CommentOperation(Base):

    __tablename__ = "commentoperation"

    commentid = Column(Integer, ForeignKey('comments.id'), primary_key=True)
    operationid = Column(Integer, ForeignKey('operations.id'), primary_key=True)

    operations = relationship("Operations")

    def __init__(self, commentid, operationid):
        self.commentid = commentid
        self.operationid = operationid

    def __repr__(self):
        return "<CommentOperation('%s', '%s')>" % (self.commentid, self.operationid)
